# $Id: PKGBUILD 88267 2013-04-15 11:14:03Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: eric <eric@archlinux.org>
# Contributor: Aurelien Foret <orelien@chez.com>

pkgname=wdm
pkgver=1.28
pkgrel=6
pkgdesc="An replacement X window display manager similar to, and based on XDM"
arch=(i686 x86_64)
depends=('windowmaker' 'pam' 'bash' 'libxmu')
license=('GPL')
source=(http://voins.program.ru/$pkgname/$pkgname-$pkgver.tar.bz2)
url="http://voins.program.ru/wdm/"
md5sums=('4da8ffe3af233305786d9b6aab78b838')

build() {
  cd $srcdir/$pkgname-$pkgver
  ./configure --prefix=/usr --with-nlsdir=/usr/share/locale \
	--sysconfdir=/etc/wdm --with-wdmdir=/etc/wdm --mandir=/usr/share/man \
	--with-fakehome=/var/empty
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make DESTDIR=$pkgdir install
  # used /etc/pam.d/xscreensaver as an example
  #
  echo "auth	required	pam_unix_auth.so" > $pkgdir/etc/pam.d/wdm
  chmod 0644 $pkgdir/etc/wdm/wdm-config
  chmod 0755 $pkgdir/etc/wdm/authdir
}
